package megamente.modelo;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the pedidodetalle database table.
 * 
 */
@Embeddable
public class PedidodetallePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int idpedidoDetalle;

	private int idpedidoCabecera;

    public PedidodetallePK() {
    }
	public int getIdpedidoDetalle() {
		return this.idpedidoDetalle;
	}
	public void setIdpedidoDetalle(int idpedidoDetalle) {
		this.idpedidoDetalle = idpedidoDetalle;
	}
	public int getIdpedidoCabecera() {
		return this.idpedidoCabecera;
	}
	public void setIdpedidoCabecera(int idpedidoCabecera) {
		this.idpedidoCabecera = idpedidoCabecera;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PedidodetallePK)) {
			return false;
		}
		PedidodetallePK castOther = (PedidodetallePK)other;
		return 
			(this.idpedidoDetalle == castOther.idpedidoDetalle)
			&& (this.idpedidoCabecera == castOther.idpedidoCabecera);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idpedidoDetalle;
		hash = hash * prime + this.idpedidoCabecera;
		
		return hash;
    }
}